﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using NHibernateSample.Domain.Entities;

namespace NHibernateSample.Data.Test
{
    [TestFixture]
    public class QueryCriteriaAPIFixture
    {
        private QueryCriteriaAPI sample;

        [TestFixtureSetUp]
        public void QueryCriteriaAPIFixtureSetup()
        {
            sample = new QueryCriteriaAPI();
        }

        [Test]
        public void GetCustomersTest()
        {
            IList<Customer> list= sample.GetCustomers();
            Assert.LessOrEqual(3,list.Count);
        }

        [Test]
        public void GetTest()
        {
            Customer customer = sample.Get(2);
            Assert.AreEqual("李 永京",customer.FullName);
        }
    }
}
